//package com.wu.yygh.order.receiver;
//
//import com.rabbitmq.client.Channel;
//import com.wu.yygh.order.service.OrderService;
//import com.wu.yygh.rabbitmq.constant.MqConst;
//import org.springframework.amqp.core.Message;
//import org.springframework.amqp.rabbit.annotation.Exchange;
//import org.springframework.amqp.rabbit.annotation.Queue;
//import org.springframework.amqp.rabbit.annotation.QueueBinding;
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//
//import java.io.IOException;
//
//@Component
//public class OrderReceiver {
//
//    @Autowired  // 监听定时任务的消息 即我是定时任务消费者
//    private OrderService orderService;
//
//    @RabbitListener(bindings = @QueueBinding(
//            value = @Queue(value = MqConst.QUEUE_TASK_8, durable = "true"),
//            exchange = @Exchange(value = MqConst.EXCHANGE_DIRECT_TASK),
//            key = {MqConst.ROUTING_TASK_8}
//    ))
//    public void patientTips(Message message, Channel channel) throws IOException {
//        //监听到消息后，执行patientTips();
//        System.out.println(message);
//        orderService.patientTips();
//    }
//
//}
